# Date	: 08/08/2012
# Author: Brother Rain
# Link	: https://www.google.com/doodles/basketball-2012
import SendKeys

print "Hi Google ^-^"

# pause game
SendKeys.SendKeys("""
	{PAUSE 3}
""")
print "START GAME"
SendKeys.SendKeys("""
	{PAUSE 1}
""")
# 1 - 5 shot
for i in range(0,5):
	# catch a ball - hold ball - throw ball - wait for next ball
	SendKeys.SendKeys("""
		{SPACE 1}
		{PAUSE 0.3}
		{SPACE 1}
		{PAUSE 0.2}
		{SPACE 1}
		{PAUSE 0.6}
	""")
	print str(i + 1) + " shot"

# 6 - 9 shot
for i in range(0,4):
	# catch a ball - hold ball - throw ball - wait for next ball
	SendKeys.SendKeys("""
		{SPACE 1}
		{PAUSE 0.4}
		{SPACE 1}
		{PAUSE 0.4}
		{SPACE 1}
		{PAUSE 0.5}
	""")
	print str(i + 6) + " shot"
	
# 10 - 13 shot
for i in range(0,4):
	# catch a ball - hold ball - throw ball - wait for next ball
	SendKeys.SendKeys("""
		{SPACE 1}
		{PAUSE 0.4}
		{SPACE 1}
		{PAUSE 0.6}
		{SPACE 1}
		{PAUSE 0.6}
	""")
	print str(i + 10) + " shot"

# 14 - 17 shot
for i in range(0,4):
	# catch a ball - hold ball - throw ball - wait for next ball
	SendKeys.SendKeys("""
		{SPACE 1}
		{PAUSE 0.4}
		{SPACE 1}
		{PAUSE 0.8}
		{SPACE 1}
		{PAUSE 0.6}
	""")
	print str(i + 14) + " shot"
print "END GAME"